(project--value-in-dir): Ensure that the global value is still honored
authorDmitry Gutov <dmitry@gutov.dev>
Fri, 15 Mar 2024 02:28:45 +0000 (04:28 +0200)
committerDmitry Gutov <dmitry@gutov.dev>
Fri, 15 Mar 2024 02:28:45 +0000 (04:28 +0200)
* lisp/progmodes/project.el (project--value-in-dir):
Ensure that the global value of the variable is still honored,
when the variable is not in dir-locals.

lisp/progmodes/project.el

index 7103b36a8923bcb68670984272d349cb70fef69a..ac18aceadcf494504eb2074d254a44f43e064cfe 100644 (file)
@@ -810,7 +810,8 @@ DIRS must contain directory names."
     (let ((enable-local-variables :all))
       (hack-dir-local-variables))
     ;; Don't use `hack-local-variables-apply' to avoid setting modes.
-    (alist-get var file-local-variables-alist)))
+    (alist-get var file-local-variables-alist
+               (symbol-value var))))
 
 (cl-defmethod project-buffers ((project (head vc)))
   (let* ((root (expand-file-name (file-name-as-directory (project-root project))))